public class Test {

    public static void main(String[] args) {
        String f1 = "123";
        int ret1 = Integer.valueOf(f1);
        int ret = Integer.parseInt(f1);

        System.out.println(ret);
    }

    public static void main11(String[] args) {
        //int 转 String
        int a = 1234;
        String s = a+"";
        System.out.println(s);

        String s1 = String.valueOf(a);
        System.out.println(s1);
    }

    public static void main10(String[] args) {
        //拼接
        String s1 = "Hello";
        System.out.println(s1);
        String s2 = "world";
        System.out.println(s2);

        System.out.println(s1+" "+s2);

        System.out.println("----------------------------");

        int a = 10;
        int b = 20;
        //System.out.printf("a=%d,b=%d\n",a,b);
        System.out.println("a = "+a+", b = "+b);
        System.out.println("a+b= "+a+b);
        System.out.println("a+b= "+(a+b));
        System.out.println(a+b+"=a+b");
    }

    public static void main9(String[] args) {
        System.out.println("输出且换行");
        System.out.print("输出但不换行");
        System.out.printf("%d\n",10);
    }

    public static void main8(String[] args) {
        int a = 10;
        long b = 20L;
        //a = (int)b;
    }

    public static void main7(String[] args) {
        boolean f1 = true;
        boolean f2 = false;
        System.out.println(f2);
    }

    public static void main6(String[] args) {
        //2个字节
        char ch = 'A';
        char ch1 = '何';
        char ch2 = 97;
        System.out.println(ch);
        System.out.println(ch1);
        System.out.println(ch2);
    }

    public static void main5(String[] args) {
        //4个字节
        //float r = 12.5;
        float r = 12.5f;
        float rr = 13.5F;
    }

    public static void main4(String[] args) {
        //8个字节
        double d = 12.5;
        System.out.println(d);

        double a = 1.1;
        double b = 1.1;
        System.out.println(a*b);

        int c = 1;
        int e = 2;
        System.out.println(c/e);

        double y = 1;
        double k = 2;
        System.out.println(y/k);
    }

    public static void main3(String[] args) {
        short o = 4;
        System.out.println(o);
        System.out.println(Short.MAX_VALUE);
        System.out.println(Short.MIN_VALUE);
    }

    //byte

    public static void main2(String[] args) {
        long u = 100;
        long p = 200L;
        System.out.println(u);
        System.out.println(Long.MAX_VALUE);
        System.out.println(Long.MIN_VALUE);
    }

    public static void main1(String[] args) {
        int a = 10;
        int aa;
        aa = 100;
        double b = 3.14;
        char c = 'H';
        System.out.println(a);
        System.out.println(b);
        System.out.println(aa);
        System.out.println(c);

        int n = 0;
        System.out.println(n);

        System.out.println(Integer.MIN_VALUE);
        System.out.println(Integer.MAX_VALUE);

        Integer f = 199;
        System.out.println(f);
    }
}

